function setTime() {
//设置首页时间
    const timeEl = document.getElementById("time");
    timeEl.innerHTML = new Date().toString();
}
//每隔一秒,刷新一次时间
setInterval(setTime, 1000);